﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using EntityObjects;

namespace PresentationLayer.View
{
    public partial class mainMenu : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            Employee emp = (Employee) Session["CurrentUser"];
            if (emp != null && !(emp.EmpId.Equals("")))
            {
                int role = emp.RoleId;
                if (role == 1)
                {
                    headMenu.Visible = true;
                }
                else if (role == 2)
                {
                    authorizedHead.Visible = true;
                }
                else if (role == 3)
                {
                    repMenu.Visible = true;
                }
                else if (role == 5)
                {
                    empMenu.Visible = true;
                }
                else if (role == 6)
                {
                    storeManagerMenu.Visible = true;
                }
                else if (role == 8)
                {
                    clerkMenu.Visible = true;
                }
            }
        }
    }
}